﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace aier.dataaccess.model
{
	[XrmEntity("lead", "leadid")]
	public class LeadXrm
	{
		[XrmFieldMapping("leadid", XrmAttributeType.UniqueIdentifier)]
		public Guid leadid
		{
			get;
			set;
		}

		/// <summary>
		/// 建档时间
		/// </summary>
		[XrmFieldMapping("new_inputingtime", XrmAttributeType.DateTime, true)]
		public Nullable<DateTime> new_inputingtime 
		{ get; 
			set; }

		/// <summary>
		/// 手机
		/// </summary>
		[XrmFieldMapping("address1_telephone1", XrmAttributeType.String, true)]
		public string address1_telephone1
		{
			get;
			set;
		}

		/// <summary>
		/// 说明
		/// </summary>
		[XrmFieldMapping("description", XrmAttributeType.String, true)]
		public string description
		{
			get;
			set;
		}



		/// <summary>
		/// 姓名
		/// </summary>
		[XrmFieldMapping("lastname", XrmAttributeType.String, true)]
		public string lastname
		{
			get;
			set;
		}

		/// <summary>
		/// 年龄
		/// </summary>
		[XrmFieldMapping("new_age", XrmAttributeType.Int, true)]
		public int? new_age
		{
			get;
			set;
		}

		/// <summary>
		/// 出生日期
		/// </summary>
		[XrmFieldMapping("new_birthdate", XrmAttributeType.DateTime, true)]
		public DateTime? new_birthdate
		{
			get;
			set;
		}

		/// <summary>
		/// 身份证号
		/// </summary>
		[XrmFieldMapping("new_citizenid", XrmAttributeType.String, true)]
		public string new_citizenid
		{
			get;
			set;
		}


		/// <summary>
		/// 数据来源
		/// </summary>
		[XrmFieldMapping("new_datasource", XrmAttributeType.XrmOptionSetValue, true)]
		public int? new_datasource
		{
			get;
			set;
		} = 6;

		/// <summary>
		/// 病种 1：白内障 2：儿童眼病 3: 高度近视 4:角膜及眼表 5:角膜塑形镜 6:泪道病 7:近视手术 8:斜弱视 9:眼底病
		///      10:眼整形眼眶病 11:医学验光配镜 12:青光眼 13:其他 14:角膜移植 15:VIP特需门诊 
		/// </summary>
		[XrmFieldMapping("new_disease", XrmAttributeType.XrmOptionSetValue, true)]
		public int? new_disease
		{
			get;
			set;
		}

		/// <summary>
		/// 0:未知的性别
		/// 1:男性
		/// 2:女性
		/// </summary>
		[XrmFieldMapping("new_gender", XrmAttributeType.XrmOptionSetValue, true)]
		public int? new_gender
		{
			get;
			set;
		}

		/// <summary>
		/// 推广来源
		/// </summary>
		[XrmFieldMapping("new_mxqd", XrmAttributeType.XrmOptionSetValue, true)]
		public int? new_mxqd
		{
			get;
			set;
		}


		/// <summary>
		/// 首次来源方式
		/// 1:网络
		/// 2:电话咨询
		/// 3:筛查
		/// 4:网医
		/// 5:会员
		/// 6:大客户
		/// 7:校园
		/// 8:自然
		/// 9:其他
		/// </summary>
		[XrmFieldMapping("new_patientsource", XrmAttributeType.XrmOptionSetValue, true)]
		public int? new_patientsource
		{
			get;
			set;
		}


		/// <summary>
		/// 建档场景说明
		/// </summary>
		[XrmFieldMapping("new_sourceremark", XrmAttributeType.String, true)]
		public string new_sourceremark
		{
			get;
			set;
		}


	}
}
